Police officers apologize, court dismisses case against them for posing with accused